﻿using AppSocketModel;
using BCGPSCommon;
using System.Collections.Generic;

namespace AppSocketService.Account
{
    public interface IAccountPersonService
    {

        /// <summary>
        /// 初始化REDIS用, 获取全部个人账户
        /// </summary>
        /// <returns></returns>
        List<AccountDto> InitRedisGetAll();


        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        AccountDto RegisterPersonAccount(AccountPersonRegisterDto dto);

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="accountLoginDto"></param>
        /// <param name="ip"></param>
        /// <returns></returns>
        AccountDto Login(AccountLoginDto accountLoginDto, string ip);
         

        /// <summary>
        /// 注销账户
        /// </summary>
        /// <returns></returns>
        bool UnRegisterPersonAccount();


        /// <summary>
        /// 获取当前用户
        /// </summary>
        /// <returns></returns>
        AccountDto GetCurrentAccount();

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="accountId"></param>
        /// <param name="password"></param>
        void UpdatePassword(string accountId, string password);
        void ModifyPassword(ModifyPasswordRequestDto requestDto);
        void SetNewPasswrod(SetPasswordRequestDto requestDto);
        void SystemAdminSetNewPassword(string phone, string passwrod);
        /// <summary>
        /// 获取全部用户列表
        /// </summary> 
        /// <param name="accountCode"></param>
        /// <param name="accountRole"></param>
        /// <param name="accountCodeType"></param>
        /// <param name="desc"></param>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <returns></returns>
        PageableList<AccountDto> SystemGetAll(string accountCode, AccountRole? accountRole, AccountCodeType? accountCodeType, bool desc, int index, int size);

        /// <summary>
        /// 通过账号获取账户信息
        /// </summary>
        /// <param name="accountCode"></param>
        /// <returns></returns>
        AccountDto GetAccountByCode(string accountCode);
    }
}